<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/_mozilla/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
promise_test(t => {
    window.testRunner.setBluetoothMockDataSet(adapter_type.blocklist);
    return window.navigator.bluetooth.requestDevice({
        filters: [{services: [device_information.name]}]
    })
    .then(device => device.gatt.connect())
    .then(gattServer => gattServer.getPrimaryService(device_information.name))
    .then(service => promise_rejects_dom(t, 'SecurityError', service.getCharacteristic(serial_number_string.name)));
}, 'Serial Number String characteristic is blocklisted.');
</script>
